/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidades.EntidadesAutores;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author LUIGI
 */
@Entity
@Table(name = "tesis")
@NamedQueries({
    @NamedQuery(name = "Tesis.findAll", query = "SELECT t FROM Tesis t"),
    @NamedQuery(name = "Tesis.findByIdTesis", query = "SELECT t FROM Tesis t WHERE t.idTesis = :idTesis"),
    @NamedQuery(name = "Tesis.findByNombre", query = "SELECT t FROM Tesis t WHERE t.nombre = :nombre"),
    @NamedQuery(name = "Tesis.findByAutor", query = "SELECT t FROM Tesis t WHERE t.autor = :autor"),
    @NamedQuery(name = "Tesis.findByAcesor", query = "SELECT t FROM Tesis t WHERE t.acesor = :acesor")})
public class Tesis implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "IdTesis")
    private Integer idTesis;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 80)
    @Column(name = "Nombre")
    private String nombre;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "Autor")
    private String autor;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "Acesor")
    private String acesor;

    public Tesis() {
    }

    public Tesis(Integer idTesis) {
        this.idTesis = idTesis;
    }

    public Tesis(Integer idTesis, String nombre, String autor, String acesor) {
        this.idTesis = idTesis;
        this.nombre = nombre;
        this.autor = autor;
        this.acesor = acesor;
    }

    public Integer getIdTesis() {
        return idTesis;
    }

    public void setIdTesis(Integer idTesis) {
        this.idTesis = idTesis;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getAutor() {
        return autor;
    }

    public void setAutor(String autor) {
        this.autor = autor;
    }

    public String getAcesor() {
        return acesor;
    }

    public void setAcesor(String acesor) {
        this.acesor = acesor;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTesis != null ? idTesis.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Tesis)) {
            return false;
        }
        Tesis other = (Tesis) object;
        if ((this.idTesis == null && other.idTesis != null) || (this.idTesis != null && !this.idTesis.equals(other.idTesis))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidades.EntidadesAutores.Tesis[ idTesis=" + idTesis + " ]";
    }
    
}
